home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / oolregex / ctrlext.inl < prev    next >
Text File  |  1995-07-31  |  9KB  |  164 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CTreeCursor CTLEXT_INLINE functions
  13.  
  14. #define CTLEXT_INLINE inline
  15.  
  16. CTLEXT_INLINE CTreeCursor::CTreeCursor() : m_hTreeItem(NULL),    m_pTree(NULL)
  17.     { }
  18. CTLEXT_INLINE CTreeCursor::CTreeCursor(HTREEITEM hTreeItem,CTreeCtrlEx* pTree) :    m_hTreeItem(hTreeItem),    m_pTree(pTree)
  19.     { }
  20. CTLEXT_INLINE CTreeCursor::CTreeCursor(const CTreeCursor& posSrc)
  21.     { *this = posSrc; }
  22. CTLEXT_INLINE CTreeCursor::~CTreeCursor()
  23.     { }
  24. CTLEXT_INLINE CTreeCursor::operator HTREEITEM()
  25.     { return m_hTreeItem; }
  26. CTLEXT_INLINE CTreeCursor CTreeCursor::InsertAfter(LPCTSTR strItem,HTREEITEM hAfter,int nImageIndex)
  27.     { return _Insert(strItem,nImageIndex,hAfter); }
  28. CTLEXT_INLINE CTreeCursor CTreeCursor::AddHead(LPCTSTR strItem,int nImageIndex)
  29.     { return _Insert(strItem,nImageIndex,TVI_FIRST); }
  30. CTLEXT_INLINE CTreeCursor CTreeCursor::AddTail(LPCTSTR strItem,int nImageIndex)
  31.     { return _Insert(strItem,nImageIndex,TVI_LAST); }
  32. CTLEXT_INLINE BOOL CTreeCursor::GetRect(LPRECT lpRect, BOOL bTextOnly)
  33.     { return m_pTree->GetItemRect(m_hTreeItem,lpRect,bTextOnly); }
  34. CTLEXT_INLINE CTreeCursor CTreeCursor::GetNext(UINT nCode)
  35.     { return m_pTree->GetNextItem(m_hTreeItem,nCode); }
  36. CTLEXT_INLINE CTreeCursor CTreeCursor::GetChild()
  37.     { return m_pTree->GetChildItem(m_hTreeItem); }
  38. CTLEXT_INLINE CTreeCursor CTreeCursor::GetNextSibling()
  39.     { return m_pTree->GetNextSiblingItem(m_hTreeItem); }
  40. CTLEXT_INLINE CTreeCursor CTreeCursor::GetPrevSibling()
  41.     { return m_pTree->GetPrevSiblingItem(m_hTreeItem); }
  42. CTLEXT_INLINE CTreeCursor CTreeCursor::GetParent()
  43.     { return m_pTree->GetParentItem(m_hTreeItem); }
  44. CTLEXT_INLINE CTreeCursor CTreeCursor::GetFirstVisible()
  45.     { return m_pTree->GetFirstVisibleItem(); }
  46. CTLEXT_INLINE CTreeCursor CTreeCursor::GetNextVisible()
  47.     { return m_pTree->GetNextVisibleItem(m_hTreeItem); }
  48. CTLEXT_INLINE CTreeCursor CTreeCursor::GetPrevVisible()
  49.     { return m_pTree->GetPrevVisibleItem(m_hTreeItem); }
  50. CTLEXT_INLINE CTreeCursor CTreeCursor::GetSelected()
  51.     { return m_pTree->GetSelectedItem(); }
  52. CTLEXT_INLINE CTreeCursor CTreeCursor::GetDropHilight()
  53.     { return m_pTree->GetDropHilightItem(); }
  54. CTLEXT_INLINE CTreeCursor CTreeCursor::GetRoot()
  55.     { return m_pTree->GetRootItem(); }
  56. CTLEXT_INLINE CString CTreeCursor::GetText()
  57.     { return m_pTree->GetItemText(m_hTreeItem); }
  58. CTLEXT_INLINE BOOL CTreeCursor::GetImage(int& nImage, int& nSelectedImage)
  59.     { return m_pTree->GetItemImage(m_hTreeItem,nImage,nSelectedImage); }
  60. CTLEXT_INLINE UINT CTreeCursor::GetState(UINT nStateMask)
  61.     { return m_pTree->GetItemState(m_hTreeItem,nStateMask); }
  62. CTLEXT_INLINE DWORD CTreeCursor::GetData()
  63.     { return m_pTree->GetItemData(m_hTreeItem); }
  64. //CTLEXT_INLINE BOOL SetItem(UINT nMask, LPCTSTR lpszItem, int nImage, 
  65. //    int nSelectedImage,    UINT nState,nStateMask,lParam);
  66. CTLEXT_INLINE BOOL CTreeCursor::SetText(LPCTSTR lpszItem)
  67.     { return m_pTree->SetItemText(m_hTreeItem,lpszItem); }
  68. CTLEXT_INLINE BOOL CTreeCursor::SetImage(int nImage, int nSelectedImage)
  69.     { return m_pTree->SetItemImage(m_hTreeItem,nImage,nSelectedImage); }
  70. CTLEXT_INLINE BOOL CTreeCursor::SetState(UINT nState, UINT nStateMask)
  71.     { return m_pTree->SetItemState(m_hTreeItem,nState,nStateMask); }
  72. CTLEXT_INLINE BOOL CTreeCursor::SetData(DWORD dwData)
  73.     { return m_pTree->SetItemData(m_hTreeItem,dwData); }
  74. CTLEXT_INLINE BOOL CTreeCursor::HasChildren()
  75.     { return m_pTree->ItemHasChildren(m_hTreeItem); }
  76. // Operations
  77. CTLEXT_INLINE BOOL CTreeCursor::Delete()
  78.     { return m_pTree->DeleteItem(m_hTreeItem); }
  79. CTLEXT_INLINE BOOL CTreeCursor::Expand(UINT nCode)
  80.     { return m_pTree->Expand(m_hTreeItem,nCode); }
  81. CTLEXT_INLINE CTreeCursor CTreeCursor::Select(UINT nCode)
  82.     { return m_pTree->Select(m_hTreeItem,nCode); }
  83. CTLEXT_INLINE CTreeCursor CTreeCursor::Select()
  84.     { return m_pTree->SelectItem(m_hTreeItem); }
  85. CTLEXT_INLINE CTreeCursor CTreeCursor::SelectDropTarget()
  86.     { return m_pTree->SelectDropTarget(m_hTreeItem); }
  87. CTLEXT_INLINE CTreeCursor CTreeCursor::SelectSetFirstVisible()
  88.     { return m_pTree->SelectSetFirstVisible(m_hTreeItem); }
  89. CTLEXT_INLINE CEdit* CTreeCursor::EditLabel()
  90.     { return m_pTree->EditLabel(m_hTreeItem); }
  91. CTLEXT_INLINE CImageList* CTreeCursor::CreateDragImage()
  92.     { return m_pTree->CreateDragImage(m_hTreeItem); }
  93. CTLEXT_INLINE BOOL CTreeCursor::SortChildren()
  94.     { return m_pTree->SortChildren(m_hTreeItem); }
  95. CTLEXT_INLINE BOOL CTreeCursor::EnsureVisible()
  96.     { return m_pTree->EnsureVisible(m_hTreeItem); }
  97.  
  98. /////////////////////////////////////////////////////////////////////////////
  99. // CTreeCtrlEx CTLEXT_INLINE functions
  100.  
  101. CTLEXT_INLINE CTreeCtrlEx::CTreeCtrlEx() : CTreeCtrl()
  102.     { }
  103. CTLEXT_INLINE CTreeCtrlEx::~CTreeCtrlEx()
  104.     { }
  105. CTLEXT_INLINE CImageList* CTreeCtrlEx::SetImageList(CImageList* pImageList, int nImageListType)
  106.     { return CTreeCtrl::SetImageList(pImageList,nImageListType); }
  107. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetNextItem(HTREEITEM hItem, UINT nCode)
  108.     { return CTreeCursor(CTreeCtrl::GetNextItem(hItem,nCode),this); }
  109. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetChildItem(HTREEITEM hItem)
  110.     { return CTreeCursor(CTreeCtrl::GetChildItem(hItem),this); }
  111. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetNextSiblingItem(HTREEITEM hItem)
  112.     { return CTreeCursor(CTreeCtrl::GetNextSiblingItem(hItem),this); }
  113. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetPrevSiblingItem(HTREEITEM hItem)
  114.     { return CTreeCursor(CTreeCtrl::GetPrevSiblingItem(hItem),this); }
  115. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetParentItem(HTREEITEM hItem)
  116.     { return CTreeCursor(CTreeCtrl::GetParentItem(hItem),this); }
  117. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetFirstVisibleItem()
  118.     { return CTreeCursor(CTreeCtrl::GetFirstVisibleItem(),this); }
  119. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetNextVisibleItem(HTREEITEM hItem)
  120.     { return CTreeCursor(CTreeCtrl::GetNextVisibleItem(hItem),this); }
  121. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetPrevVisibleItem(HTREEITEM hItem)
  122.     { return CTreeCursor(CTreeCtrl::GetPrevVisibleItem(hItem),this); }
  123. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetSelectedItem()
  124.     { return CTreeCursor(CTreeCtrl::GetSelectedItem(),this); }
  125. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetDropHilightItem()
  126.     { return CTreeCursor(CTreeCtrl::GetDropHilightItem(),this); }
  127. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::GetRootItem()
  128.     { return CTreeCursor(CTreeCtrl::GetRootItem(),this); }
  129. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::InsertItem(LPTV_INSERTSTRUCT lpInsertStruct)
  130.     { return CTreeCursor(CTreeCtrl::InsertItem(lpInsertStruct),this); }
  131. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::InsertItem(UINT nMask, LPCTSTR lpszItem, int nImage, 
  132.     int nSelectedImage,    UINT nState, UINT nStateMask, LPARAM lParam, 
  133.     HTREEITEM hParent, HTREEITEM hInsertAfter)
  134.     { return CTreeCursor(CTreeCtrl::InsertItem(nMask, lpszItem, nImage, 
  135.         nSelectedImage, nState, nStateMask, lParam, hParent, hInsertAfter),this); }
  136. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::InsertItem(LPCTSTR lpszItem, HTREEITEM hParent,HTREEITEM hInsertAfter)
  137.     { return CTreeCursor(CTreeCtrl::InsertItem(lpszItem, hParent, hInsertAfter),this); }
  138. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::InsertItem(LPCTSTR lpszItem, int nImage, int nSelectedImage,
  139.         HTREEITEM hParent, HTREEITEM hInsertAfter)
  140.     { return CTreeCursor(CTreeCtrl::InsertItem(lpszItem, nImage, nSelectedImage,
  141.         hParent, hInsertAfter),this); }
  142. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::Select(HTREEITEM hItem, UINT nCode)
  143.     { return CTreeCursor(CTreeCtrl::Select(hItem,nCode),this); }
  144. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::SelectItem(HTREEITEM hItem)
  145.     { return CTreeCursor(CTreeCtrl::SelectItem(hItem),this); }
  146. CTLEXT_INLINE CTreeCursor CTreeCtrlEx::SelectDropTarget(HTREEITEM hItem)
  147.     { return CTreeCursor(CTreeCtrl::SelectDropTarget(hItem),this); }